﻿namespace Chevron.OrderDetails.Models
{
    public class PhysicianDto
    {
        public string PhysicianUpin { get; set; }

        public string PhysicianName { get; set; }

        public decimal GrossReferralTotal { get; set; }

        public decimal NetReferralTotal { get; set; }

        public decimal GrossBillTotal { get; set; }

        public decimal DiscountTotal { get; set; }

        public decimal NetBillTotal { get; set; }

        public decimal PaymentTotal { get; set; }

        public decimal DueTotal { get; set; }

        public int NumPatients { get; set; }

        public void UpdateFromOrder(OrderDto order)
        {
            NumPatients += 1;
            GrossBillTotal += order.GrossBill;
            DiscountTotal += order.Discount;
            NetBillTotal += order.NetBill;
            PaymentTotal += order.Payment;
            DueTotal += order.Due;
            GrossReferralTotal += order.GrossReferral;
            NetReferralTotal += order.NetReferral;
            
        }
    }
}